Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor code folder structure #394

Merged
merged 3 commits into from
Jan 14, 2020
Merged

Conversation

sleidig
Copy link
Member

@sleidig sleidig commented Jan 10, 2020

Attempt to simplify the code structure with its huge number of folders at the same levels:

  1. The application code is split within the src/app/ directory into modules providing general features and abstract components (core) and concrete feature modules for users' use cases (child-dev-project).
  2. moved other entities with their components out of the children directory. These should become separate modules in the long run (but we need to remove circular dependencies here first)

Reviewers: Please have a look whether the suggested folder structure seems clear and reasonable (no need to check all diffs, unfortunately this PR touches and moves pretty much every file)

Visible/Frontend Changes

none

Architectural/Backend Changes

no functional changes

@sleidig sleidig marked this pull request as ready for review January 10, 2020 21:08
@sleidig sleidig requested review from liwde and TheSlimvReal January 10, 2020 21:08
Copy link
Collaborator

@TheSlimvReal TheSlimvReal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the new structure. I think it's good that you moved some front end components like the EntitySubrecord to the core folder because they are very generic and reusable. However the circular dependencies are definitly something we should fix. In my opinion nothing of the core folder should have a dependency to thechild-dev-project. This way we can later create a reusable Angular library with the features of the core code.

@TheSlimvReal TheSlimvReal merged commit a3e2140 into master Jan 14, 2020
@TheSlimvReal TheSlimvReal deleted the attendance-day-problems branch January 14, 2020 19:49
@sleidig
Copy link
Member Author

sleidig commented Jan 16, 2020

I really like the new structure. I think it's good that you moved some front end components like the EntitySubrecord to the core folder because they are very generic and reusable. However the circular dependencies are definitly something we should fix. In my opinion nothing of the core folder should have a dependency to thechild-dev-project. This way we can later create a reusable Angular library with the features of the core code.

Absolutely agree. We should work towards this and list the remaining cross-dependencies. There are also tools to support this kind of dependency constraints, that we could consider: https://nx.dev/angular/guides/monorepo-tags

This was referenced Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants